<?php foreach ($view_data as $key): ?>

	<div class="ibox float-e-margins">
	<form class="form-horizontal" id="glEditForm">
		<div class="ibox-title" style="border: none;">
			<h5 style="color: #00afef"><i>Edit GL Accoutnts</i></h5>
		</div>
		<div class="ibox-content">
				<div class="form-group"> <label class="col-lg-4 control-label">Company</label>
					<div class="col-lg-4">
						<input readonly type="text" name="gl_company_e" value="<?php echo $key->company_name; ?>" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-4 control-label">Code</label>
					<div class="col-lg-5">
						<input readonly type="text" name="gl_code_e" value="<?php echo $key->acct_code; ?>" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-4 control-label">Name</label>
					<div class="col-lg-5">
						<input readonly value="<?php echo $key->acct_name; ?>" type="text" name="gl_name_e" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-4 control-label">Type</label>
					<div class="col-sm-4">
						<select disabled id="gl_type_select_e" class="form-control m-b" name="gl_type_e">
							<option value="">Select</option> 
							<?php foreach($glLookups as $lookup_type) { if($lookup_type->lookup_type == "GL_ACCOUNT_TYPE") { ?>
							 <option value="<?php echo $lookup_type->lookup_code; ?>"  <?php echo ($lookup_type->lookup_code == $key->acct_type ? "selected" : ""); ?>><?php echo $lookup_type->meaning; ?></option>
							 <?php } } ?>
						</select>
					</div>
				</div>
				<input type="hidden" name="account_id" value="<?php echo $key->account_id; ?>">
				<div class="form-group">
					<label class="col-sm-4 control-label">Sub-Type</label>
					<div class="col-sm-4">
						<select disabled class="form-control m-b" name="gl_sub_type_e">
							<option value="">Select</option>
							<?php foreach($glLookups as $lookup_type) { if($lookup_type->lookup_type == "GL_ACCOUNT_SUB_TYPE") { ?>
							<option value="<?php echo $lookup_type->lookup_code; ?>" <?php echo ($lookup_type->lookup_code == $key->sub_type ? "selected" : ""); ?>><?php echo $lookup_type->meaning; ?></option> <?php } } ?>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-4 control-label">Enable</label>
					<div class="col-lg-1">
						<input disabled type="checkbox" value="ok" name="gl_enabled_e" class="i-checks" <?php echo ($key->enable_flag == 'Y' ? 'checked' : ''); ?>> 
					</div>
				</div>
			</form>
		</div>
	</div>
<?php endforeach; ?>
	<script type="text/javascript">
	$(document).ready(function() {
		$('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green'
        });
	});
	</script>